<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta content="telephone=no" name="format-detection" />
	<meta content="emai=no" name="format-detection" />
	<meta charset="utf-8" />
	<title>芝士宝宝天赋单</title>
	<link rel="stylesheet" type="text/css" href="/baby/css/common.css" />
	<link rel="stylesheet" type="text/css" href="/baby/css/result.css" />
	<script src="/baby/js/zepto-1.1.6.js"></script>
	<script src="/baby/js/fastclick.js"></script>
	<script src="/baby/js/common.js"></script>
	<script src="/baby/js/default.js"></script>
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?19f39b206aedf768b42fbc69e4e4f721";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>
</head>
<body>
	<header>
		<img class="t-header" src="/baby/img/h_result.png" alt="芝士宝宝天赋单 " />
		<div class="result">
			<div class="avatar">
				<img src="<?php echo $result['img']?>" />
			</div>
			<p><b><?php echo $result['description']?></b></p>
			<img class="congratulate" src="/baby/img/t_congratulation.png" />
			<p><b><?php echo $row['baby_nickname']?></b>宝宝未来有可能成为<span class="special career"><?php echo $result['job']?>！</span></p>
			<p>已经可以在<span class="special"><?php echo $row['job_count']?>个行业</span>中成为专家了呢！</p>
			<p>暂时位列未来职业福布斯排行榜的<span class="special">第<?php echo $top;?>名！</span></p>
		</div>
	</header>
	<section class="game-actions">
		<div class="flex-wrapper">
			<p class="flex-1">
				<img data-href="/baby/top?openid=<?php echo $row['openid']?>" src="/baby/img/i_ranking.png" />
			</p>
			<p class="flex-1">
				<img data-href="/baby/index" src="/baby/img/i_replay.png" />
			</p>
			<p class="flex-1">
				<img data-spopup=".share-notice" src="/baby/img/i_help.png" />
			</p>
		</div>
	</section>
	<section class="more-actions">
		<h2>你还可以：</h2>
		<a class="btn" data-onhover="hover" href="/baby/gift">灵丹妙药</a>
		宝宝到底天赋怎么样，基因来告诉你！
	</section>
	<div class="popup-wrapper share-notice">
		<div class="popup-bg" data-cpopup=".share-notice"></div>
		<div class="popup-layout" data-cpopup=".share-notice">
			<img class="share" src="/baby/img/t_share_1.png" />
		</div>
	</div>
	
	<script type="text/javascript">
    Zepto(function ($) {
        wx.config({
            debug: false,
            appId: '<?php echo $js_config['appId']?>',
            timestamp: <?php echo $js_config['timestamp']?>,
            nonceStr: '<?php echo $js_config['noncestr']?>',
            signature: '<?php echo $js_config['signature']?>',
            jsApiList: [
            	'onMenuShareTimeline',
            	'onMenuShareAppMessage'
            ]
        });
        wx.ready(function () {
        	wx.onMenuShareTimeline({
        	    title: '<?php echo $title?>', // 分享标题
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/baby/img/sharelogo.png', // 分享图标
        	    success: function () {
        		    var current = window.location.href;
        	        // 用户确认分享后执行的回调函数
        	        $.ajax({
        				url: "/baby/statistic",
        				data: {url: current, page_id: 2, activity_id: <?php echo $activity_id?>},
        				type: "post",
        				success: function(res){
        				}
        				
        		    });
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});

        	wx.onMenuShareAppMessage({
        	    title: '<?php echo $title?>', // 分享标题
        	    desc: '<?php echo $content?>', // 分享描述
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/baby/img/sharelogo.png', // 分享图标
        	    type: 'link', // 分享类型,music、video或link，不填默认为link
        	    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        	    success: function () {
        	        // 用户确认分享后执行的回调函数
        	    	var current = window.location.href;
        	        // 用户确认分享后执行的回调函数
        	        $.ajax({
        				url: "/baby/statistic",
        				data: {url: current, page_id: 2, activity_id: <?php echo $activity_id?>},
        				type: "post",
        				success: function(res){
        				}
        				
        		    });
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});
        });
    })
	
	</script>
	
</body>
</html>
